<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.3">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="Hexo, NexT" />





  <link rel="alternate" href="/atom.xml" title="Likianta Blog" type="application/atom+xml" />






<meta name="description" content="需求将本地项目（LikiantaProjects/AnyKey）通过Git Bash上传到Github，用于开源展示。 我的项目地址：https://github.com/Likianta/anykey 操作流程">
<meta property="og:type" content="article">
<meta property="og:title" content="使用Git Bash将本地项目push到远程版本库">
<meta property="og:url" content="https://likianta.coding.me/2017/1128200920/index.html">
<meta property="og:site_name" content="Likianta Blog">
<meta property="og:description" content="需求将本地项目（LikiantaProjects/AnyKey）通过Git Bash上传到Github，用于开源展示。 我的项目地址：https://github.com/Likianta/anykey 操作流程">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-11-28/42235452.jpg">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-11-28/66243380.jpg">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-11-28/85728540.jpg">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-11-28/5216735.jpg">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-12-1/59682268.jpg">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-12-1/32770536.jpg">
<meta property="og:updated_time" content="2018-01-11T05:12:10.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="使用Git Bash将本地项目push到远程版本库">
<meta name="twitter:description" content="需求将本地项目（LikiantaProjects/AnyKey）通过Git Bash上传到Github，用于开源展示。 我的项目地址：https://github.com/Likianta/anykey 操作流程">
<meta name="twitter:image" content="http://ozurciydg.bkt.clouddn.com/17-11-28/42235452.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.3',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://likianta.coding.me/2017/1128200920/"/>





  <title>使用Git Bash将本地项目push到远程版本库 | Likianta Blog</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Likianta Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tutorials">
          <a href="/tags/tutorial-catalog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            教程
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://likianta.coding.me/2017/1128200920/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Likianta">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="http://ozurciydg.bkt.clouddn.com/18-2-12/72826549.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Likianta Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">使用Git Bash将本地项目push到远程版本库</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-11-28T20:09:20+08:00">
                2017-11-28
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/android-base/" itemprop="url" rel="index">
                    <span itemprop="name">Android基础</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  1,023
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  4
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="需求"><a href="#需求" class="headerlink" title="需求"></a>需求</h1><p>将本地项目（LikiantaProjects/AnyKey）通过Git Bash上传到Github，用于开源展示。</p>
<p>我的项目地址：<a href="https://github.com/Likianta/anykey" target="_blank" rel="noopener">https://github.com/Likianta/anykey</a></p>
<h1 id="操作流程"><a href="#操作流程" class="headerlink" title="操作流程"></a>操作流程</h1><a id="more"></a>
<h2 id="1-安装Git软件"><a href="#1-安装Git软件" class="headerlink" title="1. 安装Git软件"></a>1. 安装Git软件</h2><p>下载地址：链接: <a href="https://pan.baidu.com/s/1jIINhbC" target="_blank" rel="noopener">https://pan.baidu.com/s/1jIINhbC</a> 密码: d1gi</p>
<h3 id="1-1-第一次打开Git-Bash。配置自己的身份："><a href="#1-1-第一次打开Git-Bash。配置自己的身份：" class="headerlink" title="1.1. 第一次打开Git Bash。配置自己的身份："></a>1.1. 第一次打开Git Bash。配置自己的身份：</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git config --global user.name &quot;Xiaoming&quot;</span><br><span class="line"></span><br><span class="line">git config --global user.email &quot;xiaoming@qq.com&quot;</span><br></pre></td></tr></table></figure>
<h3 id="1-2-初始化代码库"><a href="#1-2-初始化代码库" class="headerlink" title="1.2. 初始化代码库"></a>1.2. 初始化代码库</h3><p>在自己的本地工程目录下（比如我的是<code>F:\Workspace\LikiantaProjects\AnyKey</code>）找个空白处<code>右键 - Git Bash Here</code>，打开此路径下的Git Bash命令行。</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-11-28/42235452.jpg" alt=""></p>
<p>执行创建仓库的操作：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git init</span><br></pre></td></tr></table></figure>
<h2 id="2-注册Github账户"><a href="#2-注册Github账户" class="headerlink" title="2. 注册Github账户"></a>2. 注册Github账户</h2><p>注册过程略。这里只说一下访问Github可能会遇到的问题。</p>
<p>Github虽然没有被墙，但有些人的访问速度却很慢。Windows用户通过修改hosts文件可以提高访问速度：</p>
<p>hosts文件位置：<code>C:\Windows\System32\drivers\etc\</code></p>
<p>首先右键hosts文件，打开属性 - 安全选项卡，获取完全控制权限：</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-11-28/66243380.jpg" alt=""></p>
<p>然后用记事本打开此文件，在末尾添加以下内容：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">192.30.252.123 www.github.com</span><br><span class="line">103.245.222.133 assets-cdn.github.com</span><br><span class="line">185.31.18.133 avatars0.githubusercontent.com</span><br><span class="line">185.31.19.133 avatars1.githubusercontent.com</span><br></pre></td></tr></table></figure>
<p>（参考：国内github访问慢的解决方法 - 日月星陈 - 博客园 <a href="https://www.cnblogs.com/xmu-chenming/p/6034217.html，截止2017年11月28日测试有效）" target="_blank" rel="noopener">https://www.cnblogs.com/xmu-chenming/p/6034217.html，截止2017年11月28日测试有效）</a></p>
<p>保存关闭，重启浏览器即可。</p>
<p>注册成功后，记住自己的账号和密码，假设我的是“Xiaoming”，密码是“xm123456”。</p>
<h2 id="3-创建新项目"><a href="#3-创建新项目" class="headerlink" title="3. 创建新项目"></a>3. 创建新项目</h2><p>在Github中点击“Start a project”来创建一个新项目。如图所示：</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-11-28/85728540.jpg" alt=""></p>
<p>创建完成后，点击“Clone or download”按钮，复制HTTPS格式的Git地址到剪切板：</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-11-28/5216735.jpg" alt=""></p>
<p>比如我的是<code>https://github.com/Likianta/anykey.git</code></p>
<h2 id="4-将Git克隆到本地"><a href="#4-将Git克隆到本地" class="headerlink" title="4. 将Git克隆到本地"></a>4. 将Git克隆到本地</h2><p>找到自己电脑上的本地项目的路径，比如我的是：<code>F:\Workspace\LikiantaProjects\AnyKey</code></p>
<p>在空白处点击<code>右键 - Git Bash Here</code>，从而在此工程路径下打开Git Bash：</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-12-1/59682268.jpg" alt=""></p>
<p>在命令行中输入以下命令，将会把Github上的远程版本库克隆到本地：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git clone https://github.com/Likianta/anykey.git</span><br></pre></td></tr></table></figure>
<p>不过不用担心远程文件会把本地的工程给冲掉，因为我们克隆得到的文件其实是在该目录下新出现的一个文件夹“anykey”中装着呢：</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-12-1/32770536.jpg" alt=""></p>
<p>打开<code>F:\Workspace\LikiantaProjects\AnyKey\anykey\</code>文件夹，里面有三个文件：LICENSE、README.md以及.gitignore文件（这是一个隐藏文件，需要打开“显示隐藏的项目”才能看到）。<br>将里面的所有文件剪切并粘贴到上一级目录，确认覆盖，这样我们的本地工程就与远程版本库建立连接了。</p>
<h2 id="5-开始第一次同步"><a href="#5-开始第一次同步" class="headerlink" title="5. 开始第一次同步"></a>5. 开始第一次同步</h2><p>以下命令在Git Bash命令行中输入：</p>
<ol>
<li>添加本地所有文件</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git add .</span><br></pre></td></tr></table></figure>
<ol>
<li>提交本地代码</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git commit -m &quot;First commit.&quot;</span><br></pre></td></tr></table></figure>
<ol>
<li>将提交的内容同步到远程版本库</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git push origin master</span><br></pre></td></tr></table></figure>
<p>此时会要求你输入你的Github账号和密码，输入正确后则开始同步。</p>
<p>同步成功后可以在你的Github项目主页看到上面的文件已经被更新。</p>
<h2 id="6-Git-Bash常用操作"><a href="#6-Git-Bash常用操作" class="headerlink" title="6. Git Bash常用操作"></a>6. Git Bash常用操作</h2><p><strong>添加 - 提交 - 同步：</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">git add . //一般来说add以后紧接着就去提交（commit）了，不过你也可以先攒下来几次add，然后一并提交</span><br><span class="line"></span><br><span class="line">git commit -m &quot;First commit.&quot; //提交必须要在引号中写点东西</span><br><span class="line"></span><br><span class="line">git push origin master //首次需要输入Github账号和密码，以后就不用了</span><br></pre></td></tr></table></figure>
<p>查看最近修改：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">git status //查看整体变更（详细到文件名）</span><br><span class="line"></span><br><span class="line">git diff //查看具体变更（详细到每行代码的增删）</span><br><span class="line"></span><br><span class="line">git diff app/src/main/java/.../MainActivity.java //查看某个文件中的代码变更</span><br><span class="line"></span><br><span class="line">git checkout //撤销所有还未add的修改</span><br><span class="line"></span><br><span class="line">git log //查看历史记录</span><br></pre></td></tr></table></figure>
<hr>
<h1 id="相关参考"><a href="#相关参考" class="headerlink" title="相关参考"></a>相关参考</h1><ol>
<li>郭霖《第一行代码 第二版》p489</li>
<li>国内github访问慢的解决方法 - 日月星陈 - 博客园 <a href="https://www.cnblogs.com/xmu-chenming/p/6034217.html" target="_blank" rel="noopener">https://www.cnblogs.com/xmu-chenming/p/6034217.html</a></li>
</ol>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div id="needsharebutton-postbottom">
            <span class="btn">
              <i class="fa fa-share-alt" aria-hidden="true"></i>
            </span>
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/1126202934/" rel="next" title="04 Anykey右分页布局TableLayout">
                <i class="fa fa-chevron-left"></i> 04 Anykey右分页布局TableLayout
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/1201202913/" rel="prev" title="05 Anykey阶段性总结、bug汇总及解决">
                05 Anykey阶段性总结、bug汇总及解决 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
      <div id="lv-container" data-id="city" data-uid="MTAyMC8zNDI4MS8xMDgxOA=="></div>
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="http://ozurciydg.bkt.clouddn.com/18-2-12/72826549.jpg"
                alt="Likianta" />
            
              <p class="site-author-name" itemprop="name">Likianta</p>
              <p class="site-description motion-element" itemprop="description">Android Dev</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">73</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">8</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">2</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="http://blog.csdn.net/likianta" target="_blank" title="CSDN">
                      
                        <i class="fa fa-fw fa-crosshairs"></i>CSDN</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:sheerish@qq.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/likianta" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/5441767757/profile?rightmod=1&wvr=6&mod=personinfo" target="_blank" title="Weibo">
                      
                        <i class="fa fa-fw fa-weibo"></i>Weibo</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#需求"><span class="nav-text">需求</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#操作流程"><span class="nav-text">操作流程</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-安装Git软件"><span class="nav-text">1. 安装Git软件</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-1-第一次打开Git-Bash。配置自己的身份："><span class="nav-text">1.1. 第一次打开Git Bash。配置自己的身份：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-2-初始化代码库"><span class="nav-text">1.2. 初始化代码库</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-注册Github账户"><span class="nav-text">2. 注册Github账户</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-创建新项目"><span class="nav-text">3. 创建新项目</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-将Git克隆到本地"><span class="nav-text">4. 将Git克隆到本地</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-开始第一次同步"><span class="nav-text">5. 开始第一次同步</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#6-Git-Bash常用操作"><span class="nav-text">6. Git Bash常用操作</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#相关参考"><span class="nav-text">相关参考</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; 2017 &mdash; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Likianta</span>

  
</div>


  <div class="powered-by">
    <i class="fa fa-user-md"></i>
    <span id="busuanzi_container_site_pv">
      Site visitors:<span id="busuanzi_value_site_pv"></span>
    </span>
  </div>

<!--
  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.3</div>

-->



<div class="theme-info">
  <div class="powered-by"></div>
  <span class="post-count">Site words total count:75.2k</span>
</div>
        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.3"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  
    <script type="text/javascript">
      (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
      })(document, 'script');
    </script>
  












  





  

  

  

  
  
  
  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">

  
  
  <script src="/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    
      pbOptions = {};
      
          pbOptions.iconStyle = "box";
      
          pbOptions.boxForm = "horizontal";
      
          pbOptions.position = "bottomCenter";
      
          pbOptions.networks = "Weibo,Wechat,Douban,QQZone,Evernote";
      
      new needShareButton('#needsharebutton-postbottom', pbOptions);
    
    
  </script>

  

  

  

  

</body>
</html>
